package cn.xorange.commons.security.mapper;

import cn.xorange.commons.security.entity.SecurityUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * @author : yangjian
 * date : 2023/11/26
 */
@Mapper
public interface LoginUserMapper {

    SecurityUser selectSysUserDetail(@Param("loginName") String loginName, @Param("tenantId") Long tenantId, @Param("isTenant") Boolean isTenant, @Param("isSupper") String isSupper);

    SecurityUser selectAppUser(@Param("loginName") String loginName, @Param("loginType") String loginType);

    Integer registerUser(SecurityUser securityUser);

    Integer updateUnionIdByAppUser(@Param("openId") String openId,@Param("unionId") String unionId);

    Integer insertNicknameForAppUserProfile(@Param("userId")Long userId, @Param("nickname")String nickname, @Param("updateTime")Date updateTime);
}
